#include<iostream>
using namespace std;
int a[6]={2,3,4,5,6,7};
int main(){
    int n,ball,P_Score,O_Score;
    while(cin>>n){
        for(int i=0;i<n;i++){
        cin>>ball>>P_Score>>O_Score;
        int sum=P_Score;
        if(6-ball>=0){
            for(int j=6-ball;j<6;j++){
                sum+=a[j];
            }
        }else{
                sum+=8*(ball-6)+27;
        }
        if(sum>=O_Score){
            cout<<"Yes"<<endl;
        }else{
            cout<<"No"<<endl;
        }
    }
    }
}